package com.fs.base.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.fs.base.pojo.Modle;

/**
 * @author TiddlerCJ
 */
public interface ModleRepository extends JpaRepository<Modle,String>, JpaSpecificationExecutor<Modle>{
	Page<Modle> findByClassNameLike(String className, Pageable pageable);
	
	Modle findByClassName(String className);
	
	@Query("select count(*) from Modle m where m.className=?1")
	public long countByClassName(String className);
}
